import java.util.Scanner;
public class Elaina_10_6_ti2
{
    private int Getge(int n)
    {
        return n % 10;
    }
    private int Getshi(int n)
    {
        return (n % 100) / 10;
    }
    public int Combine(int a,int b)
    {
        return Getge(b) * 1000 + Getge(a) * 100 + Getshi(b) * 10 + Getshi(a);
    }
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        Elaina_10_6_ti2 C = new Elaina_10_6_ti2();
        System.out.println(C.Combine(a,b));
    }
}
